package info.nixbear.tgcms.admin.client.view;

import info.nixbear.tgcms.admin.client.mvp.AppActivityMapper;

import com.google.gwt.activity.shared.ActivityManager;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;

public class AdminPageUi extends Composite {

	private static AdminPageUiUiBinder uiBinder = GWT.create(AdminPageUiUiBinder.class);

	interface AdminPageUiUiBinder extends UiBinder<Widget, AdminPageUi> { }

	@Inject
	public AdminPageUi(AppActivityMapper mapper, EventBus eventBus) {
		initWidget(uiBinder.createAndBindUi(this));
		ActivityManager activityManager = new ActivityManager(mapper, eventBus);
		activityManager.setDisplay(this.getCenter());
	}

	@UiField
	SimplePanel center;

	public SimplePanel getCenter() {
		return center;
	}


}
